package com.wiscamp.ninechapters.accounts.application.assemblers;

import com.wiscamp.ninechapters.accounts.application.dto.vo.AccountLogVO;
import com.wiscamp.ninechapters.accounts.application.dto.vo.AccountVO;
import com.wiscamp.ninechapters.accounts.domain.models.Account;
import com.wiscamp.ninechapters.accounts.domain.models.AccountLog;
import org.mapstruct.Mapper;
import org.mapstruct.NullValueCheckStrategy;
import org.mapstruct.NullValuePropertyMappingStrategy;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;

@Mapper(componentModel = "spring",
        unmappedTargetPolicy = ReportingPolicy.IGNORE,
        unmappedSourcePolicy = ReportingPolicy.IGNORE,
        nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
        nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface AccountAssembler {
    AccountAssembler Instance = Mappers.getMapper(AccountAssembler.class);

    Account toAccount(AccountVO vo);

    AccountVO toAccountVO(Account entity);


    AccountLogVO toAccountLogVO(AccountLog entity);
}
